BEN=[[
      \
       \
          ___     ______    
         |   )    |        |\      |  for i in{1..*};do fortone
         |    )   |        | \     |    |xargs -0 
         |---)    |        |  \    |	   lua BenDanSay.2.lua
         |    )   |-----   |   \   |	     | lolcat;
         |     )  |        |    \  |            sleep 2;
         |    )   |        |     \ |               done
         |___)    |_____   |      \|                 do it
]]
y={}

if(arg[1]~=nil) then
	w=arg[1]
else
	w='You are stupid.You forget to write what you want to say. HaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHaHa. emmmmmm~~. BenDan'
end

math.randomseed(os.time())
k=math.random(15,66)--MeiHangZiFunShu

w=string.gsub(w,'\n','')
w=string.gsub(w,'\t','')
w=string.gsub(w,'A:',string.rep(' ',k) .. 'A:')
w=string.gsub(w,'%-%-',string.rep(' ',k) .. '--')

i=0
r=string.len(w)
while(true) do
	i=1+i
	if(r>k) then
		y[i]=string.sub(w,k*(i-1)+1,k*i)
	else
		y[i]=string.sub(w,k*(i-1)+1,r+k*(i-1))
	end
	r=r-k
	if(r<=0) then
		break
	end
end

io.write('  ')
r=string.len(w)
if(#y>1) then
	for j=1,k do
		io.write('-')
	end
else 
	for j=1,r do
 		io.write('-')
	end
end
print()

for j=1,#y do
	if(#y==1) then
		print(string.format('< %-' .. r .. 's >',y[j]))
	else
		if(j==1) then
			print(string.format('/ %-' .. k .. 's \\',y[j]))
		elseif(j==#y) then
			print(string.format('\\ %-' .. k .. 's /',y[j]))
		else
			print(string.format('| %-' .. k .. 's |',y[j]))
		end
	end
end 

io.write('  ')
if(#y>1) then
	for j=1,k do
		io.write('-')
	end
else 
	for j=1,r do
 		io.write('-')
	end
end
print()

print(BEN)
